import service from "@/utils/request";

// 获取没有匹配成功订单列表
export function getNoMatchOrderList(data) {
  return service({
    url: "/order/getNoMatchOrderList",
    method: "post",
    data,
  });
}

// 获取匹配成功订单列表
export function getMatchOrderList(data) {
  return service({
    url: "/order/getMatchOrderList",
    method: "post",
    data,
  });
}

// 编辑订单
export function editOrder(data) {
  return service({
    url: "/order/edit",
    method: "post",
    data,
  });
}

// 编辑订单
export function getOrderList(data) {
  return service({
    url: "/order/getOrderList",
    method: "post",
    data,
  });
}

export function getMatchedOrderList(data) {
  return service({
    url: "/order/getMatchedOrderList",
    method: "post",
    data,
  });
}
export function afterSales(data) {
  return service({
    url: "/order/afterSales",
    method: "post",
    data,
  });
}
// 获取订单列表（通过用户的 UUID）
export function findCusOrderByID(id) {
  return service({
      url: `/cusOrder/findCusOrder`,
      method: "get",
      params: { id },
  });
}

// 订单未完成-- 更新订单状态
export function updateUnFinishOrder(data) {
  return service({
      url: `/order/updateUnFinish`,
      method: "post",
      data
  });
}

// 订单完成-- 更新订单状态
export function updateFinishOrder(data) {
  return service({
      url: `/order/updateFinish`,
      method: "post",
      data
  });
}

export function add(data) {
  return service({
      url: `/order/add`,
      method: "post",
      data
  });
}

export function sub(data) {
  return service({
      url: `/order/sub`,
      method: "post",
      data
  });
}